<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Custom_Form extends Zend_Form
{
	public function __construct($options = null)
    {
		#element decorator
		$this->setElementDecorators(array(
			'ViewHelper',
			array('Description', array('tag' => 'div','class'=>'desc')),
			'Errors',
			'Label',
			array('HtmlTag', array('tag' => 'div','class'=>'element')),
        ));

		parent::__construct($options);
	}

	public function loadDefaultDecorators(){
	 	if ($this->loadDefaultDecoratorsIsDisabled()) {
            return;
		}

		 $this->setDecorators(array(
                'FormElements',
				'Description',
                array('HtmlTag',array('tag'=>'div','class'=>'main-frm')),
                'Form'
        ));
	}

	public function setCustomFileDecorators()
	{
		return array('File','Errors','Label',
					array('HtmlTag', array('tag' => 'div','class'=>'element')),
					);
	}

	public function loadFormClass($class = 'small-frm')
	{
		$this->setDisableLoadDefaultDecorators(true);
		$this->setDecorators(array(
                'FormElements',
				'Description',
                array('HtmlTag',array('tag'=>'div','class'=>$class)),
                'Form'
        ));
	}

}
?>
